package cn.exam.sys.services.impl;

import cn.exam.common.PageControl;
import cn.exam.common.Pager;
import cn.exam.model.Subject;
import cn.exam.sys.dao.impl.SubjectDao;
import cn.exam.sys.dao.interfaces.ISubjectDao;
import cn.exam.sys.services.interfaces.ISubjectService;

import java.util.List;

public class SubjectService implements ISubjectService {

	ISubjectDao dao = new SubjectDao();

	public Integer addsubject(Subject subject) {
		try{
			return dao.addsubject(subject);
		}catch(Exception e){
			throw new RuntimeException();
		}
		
	}

	public Pager<Subject> list(Subject subject, PageControl pc) {
		return dao.list(subject, pc);
	}

	public Integer edit(Subject subject) {
		return dao.edit(subject);
	}



	public Subject detail(Subject subject) {
		// TODO Auto-generated method stub
		return dao.detail(subject);
	}
	@Override
	public List<Subject> allSubjects() {
		return dao.allSubjects();
	}
}

